<meta title="频道管理"/>
<div class="p">
    <div id="channelsGrid"
         s='datac,nda'
         s-data="S.get('/api/channel/list')">
        <table class="table table-striped table-bordered table-middle">
            <tr>
                <th>ID</th>
                <th>名称</th>
                <th class="text-right">操作</th>
            </tr>
            <tbody s="loop">
            <tr s-loop-role="empty">
                <td colspan="3">暂无数据</td>
            </tr>
            <tr s-loop-role="row" s="datac" class="channel">
                <td name="id"></td>
                <td name="name"></td>
                <td class="text-right">
                    <input autocomplete="off" type="button" class="btn btn-xs btn-default" value="选择" s-click="select(this)"/>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</div>
<script type="text/javascript">
    function select($this) {
        var data = $this.parent().data();
        S.close(data);
    }
</script>